package com.wanglibao.woodtrade.woodtrade.model;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

import java.util.List;

/**
 * 木材分类二级
 * Created by lugg on 2016/5/10.
 */
@DatabaseTable
public class WoodTypeDetail {
    public WoodTypeDetail(String id, String parent_id, String name) {
        this.id = id;
        this.parent_id = parent_id;
        this.name = name;
    }

    public WoodTypeDetail() {
    }

    @DatabaseField(id = true)

    public String id;

    @DatabaseField
    public String parent_id;

    @DatabaseField
    public String name;

    public static String[] arrayListTurnArray(List<WoodTypeDetail> woodTypeDetailList){
        String[] strings = new String[woodTypeDetailList.size()];
        for (int i = 0; i < strings.length; i++){
            strings[i] = woodTypeDetailList.get(i).name;
        }
        return strings;
    }
}
